package com.hebau.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hebau.usercenter.model.domain.User;

import javax.servlet.http.HttpServletRequest;

/**
* @author 86183
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-03-07 17:21:04
*/
public interface UserService extends IService<User> {


    /**
     * 用户注册
     *
     * @param userAccount   账户
     * @param userPassword  密码
     * @param checkPassword 校验密码
     * @param uniqueCode
     * @return
     */
    long userRegister(String userAccount, String userPassword, String checkPassword, String uniqueCode);

    /**
     *用户登录
     * @param userAccount 账户
     * @param userPassword  密码
     * @return
     */
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 用户注销
     * @param request http请求
     * @return
     */
    int userLogout(HttpServletRequest request);

    /**
     * 用户脱敏
     * @param user 用户信息
     * @return 安全的用户信息
     */
    public User getSafetyUser(User user);
}
